package com.bwie.controller;

import com.bwie.service.CustomerService;
import com.bwie.utils.R;
import com.bwie.vo.CustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author lenovo
 */
@RestController
@RequestMapping("/customer")
public class CustomerController {

    @Autowired
    private CustomerService customerService;

    @PostMapping("/sendCode/{mobile}")
    public R sendCode(@PathVariable String mobile){
        return customerService.sendCode(mobile);
    }

    @PostMapping("/login")
    public R login(@RequestBody CustomerVo customerVo){
        return customerService.login(customerVo);
    }

}
